blob: dae5dff7a46a21492efa1fb2ef1ccfa8c28a4ad3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
<script lang="ts">
import type { PageData } from "./$types";
import Giscus from "$lib/components/Giscus.svelte";
let { data }: { data: PageData } = $props();
function formatDate(dateStr: string): string {
return new Date(dateStr).toLocaleDateString("en-US", {
year: "numeric",
month: "long",
day: "numeric",
});
}
</script>
<svelte:head>
<title>{data.metadata.title} | My Blog</title>
<meta name="description" content={data.metadata.description} />
</svelte:head>
<article>
<header>
<h1>{data.metadata.title}</h1>
<p>
<time datetime={data.metadata.date}>{formatDate(data.metadata.date)}</time
>
</p>
</header>
<data.content />
</article>
<Giscus />
<a href="/">← Back to all posts</a>
|